<?php
	$uri[1] = array(
				'link' => array('teacher','view_lesson',1),
				'title' => 'Grading Period');
	$uri[2] = array(
				'link' => array('teacher','view_lesson',2),
				'title' => 'Grade Level');
	$uri[3] = array(
				'link' => array('teacher','view_lesson',3),
				'title' => 'Section');
	
	$current = (int)$this->uri->segment(3);
	$method = $this->uri->segment(2);

?>
<a href="#" data-dropdown="lesson_dropdown" class="small button secondary">Lessons</a>

<ul id="lesson_dropdown" class="f-dropdown small" data-dropdown-content>
	View by:
	<?foreach($uri AS $u => $val):?>
		<?if($current != $u):?>
			<li><a href="<?=site_url($val['link']);?>"><?=$val['title'];?></a></li>
		<?endif;?>
	<?endforeach;?>
	
	<?if($method != 'add_lesson'):?>
	<hr />
		<li><a href="<?=site_url(array('teacher', 'add_lesson'));?>" style="color: green;">Add Lesson</a></li>
	<?endif;?>
</ul>

